home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / songbook / conditionals.sty < prev    next >
Text File  |  1994-01-22  |  662b  |  15 lines

  1. %============Conditionals by Donald Arseneau==========================
  2. %        (as of 27 July'92)
  3. %  \if\blank  --- checks if parameter is blank (Spaces count as blank)
  4. %  \if\given  --- checks if parameter is not blank: like \ifblank\else
  5. %  \if\naught --- checks if parameter is null (spaces are NOT null)
  6. {\catcode`\!=8 % funny catcode so ! will be a delimiter
  7. %
  8. \long\gdef\given#1{\fi\Ifbl@nk#1@@@\empty!}
  9. \long\gdef\blank#1{\fi\Ifbl@nk#1@@..!}% if null or spaces
  10. \long\gdef\naught#1{\IfN@Ught#1* {#1}!}% if null
  11. \long\gdef\Ifbl@nk#1#2@#3#4!{\ifx#3#4}
  12. \long\gdef\IfN@Ught#1 #2!{\blank{#2}}
  13. }
  14. %=====================================================================
  15.